import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import ViewUI from 'view-design';
import 'view-design/dist/styles/iview.css';
import ECharts from 'vue-echarts'
import request from './utils/request'
import 'echarts/lib/chart/bar'
import 'echarts/lib/component/tooltip'
import CKEditor from '@ckeditor/ckeditor5-vue2';
import  MessageHelper  from './utils/message-helper'

Vue.use( CKEditor );
Vue.use(ElementUI);
Vue.use(ViewUI);
Vue.component('chart', ECharts)
Vue.prototype.$request = request;

Vue.messageHelper = Vue.prototype.$messageHelper = MessageHelper;

Vue.prototype.shared = {
  defaultAvatar : 'http://bi-she-oss.oss-cn-beijing.aliyuncs.com/psychological-appointment-system/bi-she-img/user-avatar-img/user-avatar.png'
};

Vue.prototype.stripHtmlTags = function (html) {
  return html.replace(/<[^>]*>?/gm, '');
}
Vue.prototype.$bus = new Vue();//全局事件总线
Vue.config.productionTip = false;//阻止启动生产消息，常用作指令。
Vue.prototype.$isEmpty = function (value) { //判断是否为空
  return (undefined === value || value === null || value === '' || (Array.isArray(value) && value.length === 0));
};
Vue.prototype.$isNotEmpty = function (value) { //判断是否为空
  return !(undefined === value || value === null || value === '' || (Array.isArray(value) && value.length === 0));
};

new Vue({
  router,
  store,
  render: function (h) { return h(App) }
}).$mount('#app')
